namespace CQIE.TES.Model
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using System.ComponentModel.DataAnnotations.Schema;
    using System.Data.Entity.Spatial;

    [Table("Teacher")]
    public partial class Teacher
    {
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
        public Teacher()
        {
            Record = new HashSet<Record>();
            Teacher_Course = new HashSet<Teacher_Course>();
        }

        public int ID { get; set; }

        [StringLength(20)]
        public string WorkNumber { get; set; }

        [Required]
        [StringLength(20)]
        public string PassWord { get; set; }

        public bool? IsFreeze { get; set; }

        public int? Role { get; set; }

        [StringLength(14)]
        public string Phone { get; set; }

        [StringLength(10)]
        public string Name { get; set; }

        public string Info { get; set; }

        [Column(TypeName = "date")]
        public DateTime? Birthday { get; set; }

        public int? sex { get; set; }

        [Column("Department")]
        public int? DepartmentID { get; set; }

        [Column("TeachingOffice")]
        public int? TeachingOfficeID { get; set; }

        public virtual TeachingOffice TeachingOffice { get; set; }

        public virtual Department Department { get; set; }

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
        public virtual ICollection<Record> Record { get; set; }

        public virtual Role Role1 { get; set; }

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
        public virtual ICollection<Teacher_Course> Teacher_Course { get; set; }

        [NotMapped]
        public string RoleName { get; set; }

        [NotMapped]
        public double TotalYearScore { get; set; }

        [NotMapped]
        public double TotalAllScore { get; set; }
    }
}
